import request from '@/utils/request'

// 用你预算申报

// 列表 错误码309001
export function list(params) {
    return request({
        url: '/energy/budget-declare/list',
        method: 'get',
        params
    })
}

// 详情 错误码309002
export function detail(id) {
    return request({
        url: `/energy/budget-declare/${id}`,
        method: 'get',
    })
}

// 新增 错误码309003
export function add(data) {
    return request({
        url: `/energy/budget-declare`,
        method: "post",
        data
    });
}

// 修改 错误码309004
export function edit(data) {
    return request({
        url: `/energy/budget-declare`,
        method: "put",
        data
    });
}

// 修改 错误码309005
export function auditBudgetDeclaration(data) {
    return request({
        url: `/energy/budget-declare/audit`,
        method: "put",
        data
    });
}

// 删除 错误码309006
export function deletebudgetDeclare(id) {
    return request({
        url: `/energy/budget-declare/${id}`,
        method: "delete",
    });
}

// 审批记录 错误码309007
export function getLog(id) {
    return request({
        url: `/energy/budget-declare/${id}/auditLogs`,
        method: "get",
    });
}

// 审批记录 错误码309008
export function auditBatch(data) {
    return request({
        url: `/energy/budget-declare/audit-batch`,
        method: "put",
        data
    });
}

// 获取模板 错误码309009
export function typeConfigTemplate(params) {
    return request({
        url: `/energy/budget-declare/typeConfigTemplate`,
        method: "get",
        params
    });
}

// 获取总费用 错误码309100
export function getBudgetFund(data) {
    return request({
        url: `/energy/budget-declare/getBudgetFund`,
        method: "post",
        data
    });
}
